package com.yc.demo.d0730;

import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.annotation.*;
import java.io.IOException;

@WebServlet(name = "Hello.Servlet", value = "/hello.do")
public class HelloServlet extends HttpServlet {

    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //response.setContentType("text/html;charset=utf-8");
        final String name = request.getParameter("name");
        //request.setCharacterEncoding("utf-8");
        response.getWriter().append("你好: " + name);
    }
}
